package com.blb.service.impl;

import com.blb.entity.Menu;
import com.blb.mapper.MenuMapper;
import com.blb.service.IMenuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xiaoxiong
 * @since 2020-06-04
 */
@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IMenuService {

    @Resource
    MenuMapper menuMapper;

    @Override
    public List<Menu> getMenuByUserName(String account, String id) {
        return menuMapper.getMenuByUserName(account,id);
    }

    /**
     * 获取权限列表
     * @param pid
     * @return
     */
    @Override
    public List<Menu> getTreeMenu(String pid) {
        return menuMapper.getTreeMenu(pid);
    }

}
